#ifndef __rtoax_h
#define __rtoax_h 1


#include <stdio.h>
#include <libgen.h>
#include <stdlib.h>
#include <stdarg.h>

#ifndef _unused
#define _unused  __attribute__((unused))
#endif


#ifdef NODEBUG

#define called()    do{}while(0)
#define called2()    do{}while(0)
#define line()      do{}while(0)
#define line2()      do{}while(0)

#else

#define called() do{            \
        printf("\033[1;31m");   \
        info("[Call] %-30s %4d  in %-30s\n", __func__, __LINE__, __FILE__);\
        printf("\033[m");       \
        fflush(stdout);         \
    }while(0)

#define called2() do{            \
        printf("\033[1;31m");   \
        info("    [Call] %-30s %4d  in %-30s\n", __func__, __LINE__, __FILE__);\
        printf("\033[m");       \
        fflush(stdout);         \
    }while(0)
    
#define line()  do{             \
        printf("\033[1;34m");   \
        info("[Line] %-30s %4d  in %-30s\n", __func__, __LINE__, __FILE__);\
        printf("\033[m");       \
        fflush(stdout);         \
    }while(0)
    
#define line2()  do{             \
        printf("\033[1;34m");   \
        info("    [Line] %-30s %4d  in %-30s\n", __func__, __LINE__, __FILE__);\
        printf("\033[m");       \
        fflush(stdout);         \
    }while(0)
#endif

static int _unused info(const char _unused *format, ...)
{
	va_list _unused vl;

	va_start(vl, format);
    
    int n = vprintf(format, vl);
	va_end(vl);

    return n;
}


#endif /*<__rtoax_h>*/
